<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<isperp:processProcesser processId="${model.processId }"></isperp:processProcesser>

<div class="header">
	<h3>归还信息</h3>
</div>
<table class=" form-table">
	<tr>
		<td class="td1">编号：</td>
		<td class="td2">${model.code }</td>
		<td class="td1">归还日期：</td>
		<td class="td2"><fmt:formatDate value="${model.backDate}"
				pattern="yyyy-MM-dd" />
		</td>
	</tr>
	<tr>
		<td class="td1">归还人：</td>
		<td class="td2">${model.backManName }</td>
		<td class="td1">项目：</td>
		<td class="td2"><isperp:relationLabel moduleUrl="project/project"
				idValue="${model.projectId }" displayColumn="name" id="projectId"></isperp:relationLabel>
		</td>
	</tr>
	<tr>
		<td class="td1">填表人：</td>
		<td class="td2"><label>${model.creatorName }</label>
		</td>
		<td class="td1">归还类型：</td>
		<td class="td2"><label>${model.type }</label>
		</td>
	</tr>
	<tr>
		<td class="td1">描述：</td>
		<td class="td2" colspan="3">${model.memo }</td>
	</tr>
	
</table>
<div class="header">
	<h3>归还备件项列表</h3>
</div>

<c:choose>
  <c:when test="${model.type eq '归还维修'}">
     <isperp:grid
	url="sparepart/sparepartChangeDetail/listDetails?relationId=${model.id }"
	gridId="sparepartBackDetailGrid" showPager="false" showSearchbar="false"
	cusDialogSize="big" editurl="sparepart/sparepartChangeDetail/save"
	cusDeleteUrl="sparepart/sparepartChangeDetail/delete"
	cusFormatterActions="false" showToolbar="false"  >
	<jsp:attribute name="toolbar">
		<isperp:toolbar>
		</isperp:toolbar>
		</jsp:attribute>
	     <jsp:body>
		<isperp:column name="id" title="id" hidden="true"></isperp:column>
		<isperp:column name="spt_code" title="编号" width="80">
		</isperp:column>
		<isperp:column name="treenode_name_path" title="备件分类" width="100">
		</isperp:column>
		<isperp:column name="spt_name" title="备件名称" width="150">
		</isperp:column>
		<isperp:column name="spt_model" title="规格型号" width="100">
		</isperp:column>
		<isperp:column name="spt_unit" title="单价" width="60">   
		</isperp:column>
		<isperp:column name="cur_stock_quantity" title="当前库存" width="85">
		</isperp:column>
		<isperp:column name="quantity" title="维修数" width="120" >   
		</isperp:column> 
		<isperp:column name="repair_in_quantity" title="入库数" width="120">   
		</isperp:column> 
		<isperp:column name="repair_discard_quantity" title="报废数" width="120">   
		</isperp:column> 
		<isperp:column name="memo" title="备注" width="120" >   
		</isperp:column>
		
	</jsp:body>
</isperp:grid>
  
  </c:when>
  <c:otherwise>
     <isperp:sparepartChangeGrid relationId="${model.id }" readonly="true"
	formId="sparepartBackForm" id="sparepartBack">
</isperp:sparepartChangeGrid>
  </c:otherwise>
</c:choose>


<isperp:buttonList>
	<isperp:processButtons processKey="sparepartBackProcess"
		viewOnly="true" processId="${model.processId }"
		businessKey="${model.id }"></isperp:processButtons>
</isperp:buttonList>

